
#pragma once

namespace dulymoo {

class ABSTime
{
public:
    ABSTime();
    ABSTime(unsigned long seconds, unsigned long useconds=0);
    ABSTime(const ABSTime &);

public:
    ABSTime& operator= (const ABSTime &);

    bool operator<  (const ABSTime &) const;
    bool operator<= (const ABSTime &) const;
    bool operator>  (const ABSTime &) const;
    bool operator>= (const ABSTime &) const;
    bool operator== (const ABSTime &) const;
    bool operator!= (const ABSTime &) const;

public:
    ABSTime& Now();
    ABSTime& Adjust(long seconds=0, long useconds=0);

public:
    unsigned long seconds () const { return seconds_;  }
    unsigned long useconds() const { return useconds_; }

private:
    unsigned long seconds_;
    unsigned long useconds_;
};

}  // namespace dulymoo

